#ifndef MESSAGES_H
#define MESSAGES_H

#include "postgresql/libpq-fe.h";
#include "table.h";
#include "iostream";
#include "time.h";

#include <sys/time.h>
#include <stdio.h>
#include <unistd.h>

#include "extraclass.h";

using namespace std;

class Messages : public Table
{
	public:
		Messages ( ) : Table ( ) { }

		int Create( );

		int Clean( );

		int FindRecord( int iduser, int & idsession );

		int InsRecord( int iduser, char * text );

		int GetLastMessage( int n, 	int * iduser, int * time_, char * * text );

};

#endif // MESSAGES_H
